package cn.edu.zafu.bigdata.x.zhouyuyan.work6;

public class Cube {
    private double length;
    public double width;
    public double height;

    public Cube(double length,double width,double height){
        this.length = length;
        this.width = width;
        this.height = height;
    }

    public double getLength(){
        return length;
    }

    public double getWidth(){
        return width;
    }

    public double getHeight(){
        return height;
    }

    public boolean equals(Object obj){
        if(this==obj){
            return true;
        }
        if(obj==null || getClass() != obj.getClass()){
            return false;
        }
        Cube cube = (Cube) obj;
        return Double.compare(cube.length, this.length) == 0 &&
                Double.compare(cube.width, this.width) == 0 &&
                Double.compare(cube.height, this.height) ==0;
    }
}
